import React, {PureComponent} from "react";
import {Route, Switch, Redirect} from 'react-router-dom'
import DetailsComponent from "./DetailsComponent";
import MainComponent from "./MainComponent";

class ContentMainComponent extends PureComponent {
    render() {
        return (
            <div>
                <Switch>
                    <Route exact path='/main' component={MainComponent}/>
                    <Route exact path='/details' component={DetailsComponent}/>
                    <Redirect to="/main"/>
                </Switch>
            </div>
        )
    }
}

export default ContentMainComponent